import { Scalar as n } from '../../nodes/Scalar.js';
const a = {
  identify: t => typeof t == 'boolean',
  default: !0,
  tag: 'tag:yaml.org,2002:bool',
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
  resolve: t => new n(t[0] === 't' || t[0] === 'T'),
  stringify({ source: t, value: o }, e) {
    if (t && a.test.test(t)) {
      const r = t[0] === 't' || t[0] === 'T';
      if (o === r) return t;
    }
    return o ? e.options.trueStr : e.options.falseStr;
  },
};
export { a as boolTag };
